﻿using LJX.SmartPark.Common.Extensions;
using LJX.SmartPark.Common.ResponseOutput;
using LJX.SmartPark.Domain.AssetManage;
using LJX.SmartPark.Domain.SafeManage;
using LJX.SmartPark.EntityFramework;
using LJX.SmartPark.Service.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LJX.SmartPark.Service.AssetManage
{
    public class DeviceTypeService : IDeviceTypeService
    {
        private readonly IRepository<DeviceType> _studentService;

        private readonly StudentServerContext _context;

        public DeviceTypeService(IRepository<DeviceType> studentService, StudentServerContext context)
        {
            _studentService = studentService;
            _context = context;
        }

        public async Task<Response<List<DeviceType>>> GetDeviceTypeAsync()
        {
            var students = await _studentService.GetAllListAsync();
            var result = students.MapToList<DeviceType>();
            return Response<List<DeviceType>>.Ok(result);
        }
    }
}
